next up previous
Next: Double Buffering Up: Display Options Previous: Display Options

Pixel Formats

OpenGL has two color models: RGBAgif and color index. RGBA is very much like X's TrueColor visual type; color index is like X's PseudoColor visual type. Typically, OpenGL implementations support windows of both color models on the screen simultaneously. The ``depth'' or amount of color resolution for each window may also vary. So for instance, both 8-bit color index windows and 24-bit RGBA windows may co-exist on the screen at the same time.

Such display hardware needs to scan out not only the value of each pixel in the frame buffer, but also each pixel's format to determine what color to display. The X11 protocol supports multiple visuals (ie, multiple pixel formats), but most 2D low-end workstations actually support a single visual.



mjk@sgi.com